<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>修改密码</title>
		<link href="../../static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
		<link href="../../static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
		<link href="../../static/css/animate.min.css" rel="stylesheet">
		<link href="../../static/css/style.min.css?v=4.0.0" rel="stylesheet"><base target="_blank">
		<link rel="stylesheet" href="../../static/css/plugins/popup/popup.css">
		<link rel="stylesheet" href="../../static/css/login.css">
		<style>
		   body{
		     background-color: #2f4050!important;
		   }
		   .login-box h3{
		     color: #000;
		   }
		   .loginscreen{
		     background: #fff;
		     border-radius: 10px;
		     padding: 30px;
		   }
		</style>
	</head>
	<body class="gray-bg">
		<div class="middle-box text-center loginscreen  animated fadeInDown">
		    <div class="login-box">
		        <h3>请修改密码</h3>
		        <div>
		            <div class="form-group">
		                <input type="password" class="form-control" name="password" placeholder="请输入新密码">
		            </div>
		            <button class="btn btn-primary block full-width m-b submit">提 交</button>
		            <!-- <p class="text-muted text-center"> <a href="login.html#"><small>忘记密码了？</small></a> | <a href="register.html">注册一个新账号</a>
		            </p> -->
		        </div>
		    </div>
		</div>
		 <script src="../../static/js/jquery.min.js?v=2.1.4"></script>
		<script src="../../static/js/plugins/popup/popup.js"></script>
		<script src="../../static/js/http.js"></script>
		<script>
			$('.submit').on('click',function(){
				var psw = $.trim($('input[name="password"]').val());
				if(!psw){
					popup.tips('请输入新密码',1000);
					return;
				}else if(psw.length<6){
					popup.tips('最少设置6位数密码',1000);
					return;
				}
				var params = {
					password:psw
				}
				_POST('/system/user/resetPwd',params).then(function(res){
					//修改成功
					popup.tips('修改成功请重新登录',1000)
					setTimeout(function(){
						location.href = '/login';
					},500)
				})
			})
		</script>
	</body>
</html>
